package gui.win.proj.add;

import gui.Segl1;
import gui.utils.Borders;
import gui.utils.FilePicker;
import gui.utils.InputText;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;

/*Author: John Archer, Contact: john.archer.jpa@gmail.com*/
public class AddP extends JFrame{
    private InputText inTxt;
    private FilePicker fcb;
    public AddP(Segl1 Seg_L1){
        super();
        this.setLocation(Seg_L1.getLocationOnScreen().x + 50, Seg_L1.getLocationOnScreen().y + 50);
        this.setLayout(new FlowLayout());
        this.setSize(new Dimension(400, 166));
        JPanel p = new JPanel();
        p.setBorder(Borders.getTitledBorder(Borders.STANDARD_TITLED_BORDER, "ADD PROJECT"));
        p.setLayout(new BorderLayout());
        p.add(inTxt = new InputText("TITLE", 32), BorderLayout.NORTH);
        p.add(fcb = new FilePicker("TEMPLATE (FASTA)",true, 19, 154), BorderLayout.CENTER);
        this.add(p, BorderLayout.CENTER);
        this.add(new Buttons(Seg_L1, this), BorderLayout.SOUTH);
        this.setVisible(true);
        this.setAlwaysOnTop(true);
    }
    public String getPTitle(){return inTxt.getText();}
    public String getPath(){return fcb.getPath();}
    public void closeFrame(){this.dispose();}
}